package com.tjetc.hw.hw8;

import java.io.*;
import java.util.HashMap;
import java.util.Map;

public class hw8 {
    public static void main(String[] args) throws IOException {
        BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter("score.txt"));
        BufferedReader  bufferedReader = new BufferedReader(new FileReader("score.txt"));
        Map<String,Integer> map = new HashMap<>();
        String line;
        while ((line =bufferedReader.readLine())!=null){
            String[] split = line.split("=");
            map.put(split[0],Integer.parseInt(split[1]));
            if (map.containsKey("lisi")){
                map.put("lisi",100);
            }
        }
        for (Map.Entry<String, Integer> entry : map.entrySet()) {
            bufferedWriter.write(entry.getKey()+"="+entry.getValue()+"\r\n");
        }
    }
}
